<extend name="Public/base"/>

<block name="body">
	 <div class="am-container">
	 	
	 	<!-- 面包屑 -->

	 	<ol class="am-breadcrumb">
		  <li><a href="{:U('Index/index')}">{:C('WEB_SITE_NAME')}</a></li>
		  <li class="am-active"> {$cate['category_name']}   </li>
		</ol>

	 	<include file="category" />

	 	<div class="submenu clear">

		  <a class="submenu-item <eq name="sort" value="create_time">active</eq>" href="{:U('Goods/cate',array('id'=>$cate['id'],'type'=>$type))}">默认</a><span>|</span>
		  <a class="submenu-item <eq name="sort" value="volume">active</eq>"  href="{:U('Goods/cate',array('id'=>$cate['id'],'sort'=>'volume','type'=>$type))}">销量</a><span>|</span>
		  <a class="submenu-item <eq name="sort" value="price">active</eq>"  href="{:U('Goods/cate',array('id'=>$cate['id'],'sort'=>'price','type'=>$type))}">价格</a><span>|</span>
		  <a class="submenu-item <eq name="sort" value="hits">active</eq>"  href="{:U('Goods/cate',array('id'=>$cate['id'],'sort'=>'hits','type'=>$type))}">浏览量</a>

	 	</div>
	 	<div class="am-g">
	 		<include file="Public:goods_list" />
	 	</div>
	 	

			 <button id="next" class="hidden btn-get-more" data-url="{$next_page}">
				 点击加载更多
			 </button>


      </div>	 
</block>
<block name="script">
<script>
	$(function(){
		$('.goods-list').find('li').each(function(){

			a = $('.goods-list').innerWidth()/4*1.4;
			b = $('.goods-list').innerWidth()/4*0.95;
			$(this).find('.goods-pic').each(function(){
				$(this).innerHeight(Math.round(b)-1);	
			});
			$(this).innerHeight(Math.round(a)-1);	
			
		});
		$(".goods-list li").hover(
 				function(){
 				   //当鼠标放上去的时候,程序处理
 				   $(this).addClass("hover1 hover");
 				},
 				function(){
 				   //当鼠标离开的时候,程序处理
 				   $(this).removeClass("hover1 hover");
 		});
 		highlight_subnav("{:U('Goods/cate',array('id'=>$top_category['id']))}");
 		
		$('.category-item').find('a[href="'+'{$url}'+'"]').addClass('active');
	});
	function response(){
		$(".goods-list li").hover(
			function(){
				//当鼠标放上去的时候,程序处理
				$(this).addClass("hover1 hover");
			},
			function(){
				//当鼠标离开的时候,程序处理
				$(this).removeClass("hover1 hover");
			});
		$('.lazy').lazyload();
	}
	
	</script>
</block>
